#!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
@author:shengwei
@file:mysql_py.py
@time:2018/2/28 002811:38
"""

import mysql.connector

conn = mysql.connector.connect(user='root', password='kaibei', database='kppw')
cursor = conn.cursor()
# result = cursor.execute('create table user (id varchar(20) primary key, name varchar(20))')
cursor.execute('insert into user (id, name) values (%s, %s)', ['1', 'Michael'])

print(cursor.rowcount)
